package com.molan.molan_music.controller;

import com.molan.molan_music.dto.UserDto;
import com.molan.molan_music.service.RoleService;
import com.molan.molan_music.vo.RoleVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Api(tags = "角色管理接口")
@RestController
@RequestMapping("/roles")
public class RoleController {

    @Resource
    private RoleService roleService;

    @ApiOperation(value = "获取角色",notes = "获取角色")
    @GetMapping("/getRoles")
    List<RoleVo> getRoles(){
        return roleService.getRoles();
    }
}
